package com.neuedu.javase.gui;

import javax.swing.*;
import java.awt.*;

/**
 * @auth 金山老师
 * title:   书籍代码
 * creatime: 2022-10-06 11:42
 * 描述 :
 */
public class MyPanel extends JPanel {
    public MyPanel() {

        setLayout(null);


        //      btn.setSize();
        //      btn.setLocale();
        for (int i = 0; i < 10; i++) {
            Button btn = new Button("btn1 ");
            btn.setBounds(0, i * 30, 80, 30);
            this.add(btn);
        }

    }
    public static void main(String[] args){
        String s1 = new String ("amit") ;

        System. out. println(s1. replace('m','r')) ;

        System. out.println(s1) ;

        String s3 = "arit";

        String s4 = "arit";

        String s2 = s1. replace('m', 'r') ;

        System. out.println(s2 == s3) ;

        System. out.println(s3 == s4);
    }
}
